package com.jason.library.crash.record;

import android.content.Context;

import com.jason.library.crash.util.CrashFileUtils;

/**
 * Description:LocalCrashProcessor
 *
 * @author 陈宝阳
 * @create 2020/11/17 17:07
 */
public class LocalCrashProcessor implements ICrashProcessor {

    @Override
    public void dealCrashInfo(Context context, Throwable throwable) {
        //收集设备信息
        //保存错误报告文件
        if(canExecute()) {
            CrashFileUtils.saveCrashInfoInFile(context, throwable);
        }
    }

    @Override
    public boolean canExecute() {
        return true;
    }
}
